package cn.mifengkong.appcommon.buriedpoint;

import com.mifengkong.frtools.app.FRApplication;

import cn.mifengkong.appcommon.util.ChannelUtil;

/**
 * Created by jiangyongxing on 2017/10/23.
 * 描述：
 */

public class YingyongbaoAppidAndKeyList {

    /**
     * APPID
     *
     * @return
     */
    public static String getAppid(String applicationId) {
        switch (applicationId) {
            case "cn.mifengkong.loan"://简融
                return "1105532213";
            case "cn.xmfengrong.sudai"://新速贷
                return "";
            case "cn.mifengkong.twotypeloan"://信用卡贷款
                return "1105676089";
            case "cn.mifengkong.huaxiaapp"://速贷
                return "1105723561";
            case "cn.mirong.caishenloan"://财神贷信用借款
                return "1105879239";
            case "cn.rongdao.jrkabao":   //卡猫信用卡取现
                return "1106162815";
            case "cn.fengrong.cardmanager":   //懒人信用卡
                return "1106687675";
            default:
                break;
        }
        return "";
    }

    /**
     * 秘钥
     *
     * @return
     */
    public static String getSignKey(String applicationId) {
        switch (applicationId) {
            case "cn.mifengkong.loan"://简融
                return "187ee1108581ed1f";
            case "cn.xmfengrong.sudai"://新速贷
                return "";
            case "cn.mifengkong.twotypeloan"://信用卡贷款
                return "2bf49f4cf10f2694";
            case "cn.mifengkong.huaxiaapp"://速贷
                return "7af43b0cff8cd41b";
            case "cn.mirong.caishenloan"://财神贷信用借款
                return "843ec8c17f2819a6";
            case "cn.rongdao.jrkabao":   //卡猫信用卡取现
                return "808ba5a0f32dd8d0";
            case "cn.fengrong.cardmanager":   //懒人信用卡
                return "a85537eb37f1df9a";
            default:
                break;
        }
        return "";
    }

    /**
     * 广告主
     *
     * @return
     */
    public static String getAdvertiserId(String applicationId) {
        switch (applicationId) {
            case "cn.mifengkong.loan"://简融
                return "4554388";
            case "cn.xmfengrong.sudai"://新速贷
                return "";
            case "cn.mifengkong.huaxiaapp"://速贷
                return "6210128";
            case "cn.mifengkong.twotypeloan"://信用卡贷款
                return "6416593";
            case "cn.mirong.caishenloan"://财神贷信用借款
                return "6456915";
            case "cn.rongdao.jrkabao":   //卡猫信用卡取现
                return "";
            case "cn.fengrong.cardmanager":   //懒人信用卡
                return "";
            default:
                break;
        }
        return "";
    }

    /**
     * 根据chanelID来判断当前的包是否要请求应用宝的接口
     *
     * @param applicationId
     * @return true   需要请求     false   不用请求
     */
    public static boolean needRequestQQBycurrentChannelId(String applicationId) {
        String channelId = ChannelUtil.getChannelName(FRApplication.getInstance().getApplicationContext());
        switch (applicationId) {
            case "cn.mifengkong.loan"://简融
            case "cn.mifengkong.twotypeloan"://信用卡贷款
            case "cn.mirong.caishenloan"://财神贷信用借款
            case "cn.rongdao.jrkabao":   //卡猫信用卡取现
            case "cn.fengrong.cardmanager":   //懒人信用卡
                return "yingyongbaocpd".equalsIgnoreCase(channelId);
            case "cn.xmfengrong.sudai"://新速贷
                return false;
            case "cn.mifengkong.huaxiaapp"://速贷
                return "yingyongbaosudaixin".equalsIgnoreCase(channelId);
            default:
                break;
        }
        return false;
    }
}